package com.xiaoshuidi.cloud.module.bpm.service.assignrecord;

import com.xiaoshuidi.cloud.module.bpm.controller.admin.assignrecord.vo.TicketAssignRecordCreateReqVO;
import com.xiaoshuidi.cloud.module.bpm.dal.dataobject.assignrecord.TicketAssignRecordDO;

import javax.validation.*;
import java.util.List;

/**
 * 预约工单指派记录 Service 接口
 *
 * @author 合房租赁
 */
public interface TicketAssignRecordService {

    /**
     * 创建预约工单指派记录
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createTicketAssignRecord(@Valid TicketAssignRecordCreateReqVO createReqVO);

    void deleteByReserveTicketId(Long reserveTicketId);

    List<TicketAssignRecordDO> getByTicketIdOrderById(Long reserveTicketId);

    /**
     * 查询工单的指派记录，按创建时间倒序
     * @param id
     * @return
     */
    List<TicketAssignRecordDO> getByTicketIdOrderByCreateTime(Long reserveTicketId);
}
